]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dateMenu: Use .desktop file to launch calendar
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 19 Jun 2012 15:56:01 +0000 (17:56 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 3 Jul 2012 22:24:05 +0000 (00:24 +0200)
When selecting "Open Calendar" in the date menu, the configured
application is launched via command line, so we don't get any
startup notification. If Evolution is used as calendar application,
launch it via the .desktop file added by the last commit instead in
order to fix the issue.

https://bugzilla.gnome.org/show_bug.cgi?id=677907

js/ui/dateMenu.js

index 5e5b3afe222353170a8b463be63aaf2d65accd9a..7a691df1084074c8937e8f626b408974bf47c933 100644 (file)
@@ -167,9 +167,10 @@ const DateMenuButton = new Lang.Class({
         this.menu.close();
         let calendarSettings = new Gio.Settings({ schema: 'org.gnome.desktop.default-applications.office.calendar' });
         let tool = calendarSettings.get_string('exec');
-        if (tool.length == 0 || tool == 'evolution') {
+        if (tool.length == 0 || tool.substr(0, 9) == 'evolution') {
             // TODO: pass the selected day
-            Util.spawn(['evolution', '-c', 'calendar']);
+            let app = Shell.AppSystem.get_default().lookup_app('evolution-calendar.desktop');
+            app.activate();
         } else {
             let needTerm = calendarSettings.get_boolean('needs-term');
             if (needTerm) {